====== Simple 2-States ======

\( \require{newcommand} \)
\( \newcommand{\diff}[2]{\frac{d{#1}}{d{#2}}} \)

Following the [[..:Simple 2-Species:start]] analysis we continue by considering the simple 2-state model.

===== 2 States, 1 Species =====

In this case, we want to consider a single species that can exist in one of two states and may switch between them.  As before, we exclude the bound state from consideration, each instance represents a single individual.  We denote our two states by \(X\) and \(Y\)).

===== Reactions =====

Our original [[..:Simple 1-State:start#Reactions | five reactions]] for the 1-State model now expand to 18 reactions:
\[
\begin{array}{rclrcll}
  \emptyset & \xrightarrow{\alpha_x} & X,         & \emptyset & \xrightarrow{\alpha_y} & Y         & \text{(spontaneous creation)} \\
  X   & \xrightarrow{\beta_{xx}}     & 2 X,       & X   & \xrightarrow{\beta_{xy}}     & X + Y     & \text{(induced creation by }X\text{)} \\
  Y   & \xrightarrow{\beta_{yy}}     & 2 Y,       & Y   & \xrightarrow{\beta_{yx}}     & X + Y     & \text{(induced creation by }Y\text{)} \\
  2 X & \xrightarrow{\gamma_{xxx}}   & 3 X,       & 2 X & \xrightarrow{\gamma_{xxy}}   & 2 X + Y   & \text{(pair-induced creation by }X+X\text{)} \\
  2 Y & \xrightarrow{\gamma_{yyy}}   & 3 Y,       & 2 Y & \xrightarrow{\gamma_{yyx}}   & 2 Y + X   & \text{(pair-induced creation by }Y+Y\text{)} \\
  X + Y & \xrightarrow{\gamma_{xyx}} & 2 X + Y,   & X + Y & \xrightarrow{\gamma_{xyy}} & X + 2 Y   & \text{(pair-induced creation by }X+Y\text{)} \\
  X   & \xrightarrow{\delta_x}       & \emptyset, & Y   & \xrightarrow{\delta_y}       & \emptyset & \text{(spontaneous removal)} \\
  2 X & \xrightarrow{\kappa_{xx}}  & X,         & X + Y & \xrightarrow{\kappa_{xy}}& X         & \text{(induced removal by }X\text{)} \\
  2 Y & \xrightarrow{\kappa_{yy}}  & Y,         & X + Y & \xrightarrow{\kappa_{yx}}& Y         & \text{(induced removal by }Y\text{)}.
\end{array}
\]

==== Transition reactions ====

Additionally, we have 6 more reactions describing transitions between states (with no change in population size):
\[
\begin{array}{rclrcll}
  X   & \xrightarrow{\zeta_x}      & Y,         & Y   & \xrightarrow{\zeta_y}      & X         & \text{(spontaneous transition)} \\
  2 X & \xrightarrow{\eta_{xx}}      & X + Y,     & X + Y & \xrightarrow{\eta_{xy}}    & 2 X       & \text{(induced transition by }X\text{)} \\
  2 Y & \xrightarrow{\eta_{yy}}      & X + Y,     & X + Y & \xrightarrow{\eta_{yx}}    & 2 Y       & \text{(induced transition by }Y\text{)}.
\end{array}
\]
In total, these 24 possible reactions fully describe all possible two-state simple systems (without bonding).

===== Symmetry break =====

The reactions as written are symmetric under an \(X\leftrightarrow Y\) transformation.  The two states are formally interchangeable.  That's probably more generality than we need and makes the math more complex than it needs to be.  Without (much?) loss of generality we can characterize one of the states to break the symmetry and simplify the math.  Let us choose the following symmetry break: Individuals of type \(X\) must be involved in creation.  Reactions that increase the population count must have an \(X\)-individual in the reactant set((Note this abolishes spontaneous creation, including spontaneous immigration.)).  Hence, the following six parameters must be zero to indicate their associated reactions do not occur:
\[
  \alpha_x = \alpha_y = \beta_{yy} = \beta_{yx} = \gamma_{yyy} = \gamma_{yyx} = 0.
\]
===== Timescale separation =====

The population densities of the two states, \(x\) and \(y\), will behave as
\[
\begin{array}{rcl}
  \diff{x}{t} & = a_x x^2 + b_x x y + C_x y^2 + D_x x + e_x y \\
  \diff{y}{t} & = A_y x^2 + b_y x y - C_y y^2 + D_y x - E_y y
\end{array}
\]
where((Capitalization denotes strictly non-negative parameters.))
\[
\begin{array}{rlrl}
  a_x & \equiv \gamma_{xxx} - \kappa_{xx} - \eta_{xx},               & A_y & \equiv \gamma_{xxy} + \eta_{xx} \geq 0 \\
  b_x & \equiv \gamma_{xyx} - \kappa_{yx} + \eta_{xy} - \eta_{yx},   & b_y & \equiv \gamma_{xyy} - \kappa_{xy} + \eta_{yx} - \eta_{xy} \\
  C_x & \equiv \eta_{yy} \geq 0,                                     & C_y & \equiv \kappa_{yy} + \eta_{yy} \geq 0 \\
  D_x & \equiv \zeta_y \geq 0,                                       & D_y & \equiv \beta_{xy} + \zeta_x \geq 0 \\
  e_x & \equiv \beta_{xx} - \delta_x - \zeta_x,                      & E_y & \equiv \delta_y + \zeta_y \geq 0.
\end{array}
\]

It's not clear what the general behaviour of this system is so we should make some further assumptions.  I have found //timescale separation// to be useful: let's assume that //physiological// transitions between states (reactions governed by \(\eta\) and \(\zeta\)) occur on a much faster timescale than the other //ecological// ones (which involve changes to the population size).  Roughly, we're assuming physiological changes are must faster than ecological.  We can formalize this assumption by rescaling the ecological rate constants by \(\epsilon \ll 1\):
\[
\begin{array}{rclrcl}
  \beta  & = & \epsilon \beta'  & \gamma & = & \epsilon \gamma' \\
  \delta & = & \epsilon \delta' & \kappa & = & \epsilon \kappa'.
\end{array}
\]

Under this assumption our rate equations become
<div right><BOOKMARK:Eq_1>(Eq. 1)</div>
\[
\begin{array}{rcl}
  \diff{x}{t} & = -A_x x^2 + b_x x y + C_x y^2 + D_x x - E_x y \\
  \diff{y}{t} & =  A_y x^2 + b_y x y - C_y y^2 + D_y x - E_y y
\end{array}
\]
where((Capitalization denotes strictly non-negative parameters.))
\[
\begin{array}{rlrl}
  A_x & \equiv \eta_{xx} + \epsilon(\kappa'_{xx} - \gamma'_{xxx}) \geq 0,               & A_y & \equiv \epsilon \gamma'_{xxy} + \eta_{xx} \geq 0 \\
  b_x & \equiv \epsilon (\gamma'_{xyx} - \kappa'_{yx}) + \eta_{xy} - \eta_{yx},   & b_y & \equiv \epsilon (\gamma'_{xyy} - \kappa'_{xy}) + \eta_{yx} - \eta_{xy} \\
  C_x & \equiv \eta_{yy} \geq 0,                                     & C_y & \equiv \epsilon \kappa'_{yy} + \eta_{yy} \geq 0 \\
  D_x & \equiv \zeta_y \geq 0,                                       & D_y & \equiv \epsilon \beta'_{xy} + \zeta_x \geq 0 \\
  E_x & \equiv \zeta_x + \epsilon (\delta'_x - \beta'_{xx}) \geq 0,                      & E_y & \equiv \epsilon \delta'_y + \zeta_y \geq 0.
\end{array}
\]

===== Timescale separation without symmetry break =====

Aside: Can we say anything about the dynamics by using timescale separation without resorting to symmetry break?  Maybe we can get to a point where the equations suggest their own simplification (instead of arbitrarily breaking symmetry).  Let's start with our original [[#reactions | reactions]] and look at the dynamics on the slow timescale, \(t' = \epsilon t\).  Then
\[
\begin{array}{rcl}
  \diff{x}{t'} & = \frac{1}{\epsilon} \diff{x}{t} & = + \frac{1}{\epsilon} P + O(\epsilon^0) \\
  \diff{y}{t'} & = \frac{1}{\epsilon} \diff{y}{t} & = - \frac{1}{\epsilon} P + O(\epsilon^0) \\
  \diff{n}{t'} & = \frac{1}{\epsilon} \diff{n}{t} & = O(\epsilon^0)
\end{array}
\]
where \(n = x+y\) is the total population density and
\[
  P = -\zeta_x x + \zeta_y y - \eta_{xx} x^2 + \eta'_{xy} x y + \eta_{yy} y^2
\]
where \(\eta'_{xy} \equiv \eta_{xy} - \eta_{yx} \).

The \(\diff{n}{t'}\) expression indicates that the total population density varies smoothly on the slow timescale, regardless of \(\epsilon\).  The \(\frac{1}{\epsilon} P\) terms, on the other hand, will diverge as \(\epsilon\rightarrow 0\) unless \(x\) and \(y\) are in a //quasi-steady-state//.  We can use this criterion to determine the //quasi-steady-state approximate// (QSSA) solution for \(x\) and \(y\) in terms of \(n\).  We require \(P=0\) for well-behaved dynamics so
\[
\begin{array}{rcl}
  x_q & = & -\frac{\zeta_x+\zeta_y+2 n \eta_{yy}-n \eta_{xy}' \pm \sqrt{4 n (\zeta_y+n \eta_{yy}) \left(\eta_{xx}-\eta_{yy}+\eta_{xy}'\right)+\left(\zeta_x+\zeta_y+2 n \eta_{yy}-n \eta_{xy}'\right)^2}}{2 \left(\eta_{xx}-\eta_{yy}+\eta_{xy}'\right)} \\
  y_q & = & \frac{\zeta_x+\zeta_y+2 n \eta_{xx}+n \eta_{xy}' \pm \sqrt{-4 n (\zeta_x+n \eta_{xx}) \left(\eta_{xx}-\eta_{yy}+\eta_{xy}'\right)+\left(\zeta_x+\zeta_y+2 n \eta_{xx}+n \eta_{xy}'\right)^2}}{2 \left(\eta_{xx}-\eta_{yy}+\eta_{xy}'\right)}.
\end{array}
\]

<div right box 50%>
FIXME

So far:
  * Solved for x_q & y_q
  * Got a complicated expression for dn/dt vs. n
  * Can write in terms of dn/dt vs z=n/(n+nA) for arbitrary nA
Next time:
  * How to choose nA?  Is there a "best" nA?  
  * Is there a "best" assumption that makes the dynamics easiest to work with?

 --- //[[rik.blok@ubc.ca|Rik Blok]] 2011-03-04 23:51//

FIXME
</div>

===== Dynamics =====


==== Nullclines ====

The nullclines for each rate equation in //x-y// space can be found by recognizing that \(\diff{x}{t}=0\) and \(\diff{y}{t}=0\) represent conic sections.  They can be classified by their [[wp>Conics#Cartesian_coordinates | discriminants]].

FIXME


==== Equilibria ====

Equilibria exist where the two conic sections intersect.  A technique for finding the intersections is described in this Wikipedia page: [[wp>Conics#Intersecting_two_conics | Intersecting two conics]].

==== Stability ====

If the nullclines aren't readily analytic then perhaps it would be better to find the equilibria and compute their stability.

